var loadRateChart = echarts.init(document.getElementById('loadRateChart'));
function load(chartData) {
    let arry = chartData.ydata;
    return option = {
        tooltip : {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                label: {
                    backgroundColor: '#6a7985'
                }
            },
            formatter:function (params) {
                return '全部隐患数:'+ arry[params[0].dataIndex].count + '<br>已经整改:' + arry[params[0].dataIndex].process
            }
        },
        title:{
            text:"各风险点隐患整改率（本月）",
            textStyle:{
                color:'#33FFFF',
            },
            left:'center',
            top:'15px',

        },
        grid:{
            left:'140'
        },
        xAxis:[{
            max: 100,
            type:'value',
            splitLine:{
                show:false
            },
            axisLabel: {
                formatter: '{value}%',
                textStyle: {
                    color: '#fff',
                    fontWeight: '80'
                }
            }
        }],
        yAxis:[{
            type:'category',
            axisLabel: {
                color: '#fff',
                fontSize: 14
            },
            splitLine:{
                show:false
            },
            data:chartData.ydata
        }],
        series:[{

            type:'bar',
            barWidth: 12,
            itemStyle: {
                normal: {
                    //barBorderRadius: 20, //统计条弧度
                    color: {

                        colorStops: [{
                            offset: 0,
                            color: '#00b0ff' // 0% 处的颜色
                        }, {
                            offset: 1,
                            color: '#7052f4' // 100% 处的颜色
                        }],
                        globalCoord: false, // 缺省为 false

                    }
                },
            },
            data:chartData.xdata
        }],

    }

}

